package dialer.ws.base.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "audit", schema = "call_center")
@NamedQueries({ @NamedQuery(name = "getAuditByStartEnd", query = "from Audit where estatus=:estatus") })
public class Audit implements Serializable {

	private static final long serialVersionUID = -7883025699351745396L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_status", nullable = false)
	private Agent agent;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_break", nullable = false)
	private Breakk breakk;

	@Column(name = "datetime_init", nullable = false)
	private Date datetimeInit;

	@Column(name = "datetime_end", nullable = false)
	private Date datetimeEnd;

	@Column(name = "duration")
	private Date duration;

	@Column(name = "ext_parked")
	private String extParked;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Agent getAgent() {
		return agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}

	public Breakk getBreakk() {
		return breakk;
	}

	public void setBreakk(Breakk breakk) {
		this.breakk = breakk;
	}

	public Date getDatetimeInit() {
		return datetimeInit;
	}

	public void setDatetimeInit(Date datetimeInit) {
		this.datetimeInit = datetimeInit;
	}

	public Date getDatetimeEnd() {
		return datetimeEnd;
	}

	public void setDatetimeEnd(Date datetimeEnd) {
		this.datetimeEnd = datetimeEnd;
	}

	public Date getDuration() {
		return duration;
	}

	public void setDuration(Date duration) {
		this.duration = duration;
	}

	public String getExtParked() {
		return extParked;
	}

	public void setExtParked(String extParked) {
		this.extParked = extParked;
	}

}
